class NoMoneyException extends Exception{
    public NoMoneyException(String str){
        super(str);
    }
}

class NoMany {
    public void number(int num) throws NoMoneyException{
        if(num > 9){
            throw new NoMoneyException("NoMoneyEXception:Whoever gives me $1000,I will thank him");
        }
    }
}








public class Num {
    public static void main(String[] args) throws NoMoneyException {
        int num = 10;
        NoMany noMany = new NoMany();
        noMany.number(num);
    }
}